package Gather.Advanced.哈希值.LinkedHashSetLearn;

import Gather.Advanced.哈希值.Student;

import java.util.LinkedHashSet;
//LinkedHashSet
public class LinkedHash {
    public static void main(String[] args) {
        Student s1=new Student("zhangsan",23);
        Student s2=new Student("lisi",13);
        Student s3=new Student("wangwu",24);
        Student s4=new Student("zhangsan",23);

        LinkedHashSet<Student> link=new LinkedHashSet<>();

        System.out.println(link.add(s1));
        System.out.println(link.add(s2));
        System.out.println(link.add(s3));
        System.out.println(link.add(s4));

        System.out.println(link);
    }
}
